<template>
  <div class="about">
    <h1>This is an about page</h1>
    <button @click="getData()">test axios 请求数据</button>
    <p>这是请求到的数据{{ testData.list }}</p>
  </div>

</template>

<script setup>
import {reactive} from '@vue/reactivity'
const testData = reactive({
  list: []
});
//测试请求方法
const getData = function () {
  this.$axios({
    url: '/test',
  }).then(res => {
    console.log(res.data)
  })
}
</script>

<style scoped>

</style>